<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        table {border-collapse: collapse; font-size: 14px; width: 80%; margin: auto}
        table, th, td {border: 1px solid darkslategray;padding: 10px}
    </style>
</head>
<body>
<h3>展示页面</h3>

<form th:action="@{/user/findList}" th:align="center">
    车牌号：<input type="text" name="cph">
    Etc卡号:<input type="text" name="kh">
    <input type="submit" value="查询">
</form>
    <table class="list">
        <tr>
            <th>id</th>
            <th>车牌号</th>
            <th>ETC卡号</th>
            <th>余额</th>
            <th>用户名</th>
            <th>使用年限</th>
            <th>操作</th>
        </tr>
        <tr th:each="user : ${list}">
            <td th:text="${user.id}"></td>
            <td th:text="${user.cph}"></td>
            <td th:text="${user.kh}"></td>
            <td th:text="${user.money}"></td>
             <td th:text="${user.name}"></td>
            <td th:text="${user.year}"></td>
            <td>
                <a th:href="@{/user/ad}">添加</a>
                <a th:href="@{'/user/del'(id=${user.id})}">删除</a>
                <a th:href="@{'/user/upd'(id=${user.id})}">修改</a>
            </td>
        </tr>
    </table>

</body>
</html>